-- leader
vim.g.mapleader = vim.keycode("<Space>")

-- appearance
vim.opt.shortmess:append("I")
vim.opt.cmdheight = 0
vim.opt.showmode = false
vim.opt.laststatus = 3
vim.opt.signcolumn = "yes"

-- cursor
vim.opt.cursorline = true
vim.opt.colorcolumn = "80"
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8
vim.opt.virtualedit = "block"

-- line numbers
vim.opt.number = true
vim.opt.relativenumber = true

-- indentation
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true

-- line wrapping
vim.opt.wrap = false

-- window splitting
vim.opt.splitbelow = true
vim.opt.splitright = true

-- search
vim.opt.hlsearch = false
vim.opt.ignorecase = true
vim.opt.smartcase = true

-- clipboard
vim.opt.clipboard = "unnamedplus"

-- buffers
vim.opt.backup = false
vim.opt.swapfile = false
vim.opt.undofile = true

-- diagnostics
vim.diagnostic.config({
    virtual_text = false,
    severity_sort = true,
    float = { border = "solid" },
})

-- netrw
vim.g.netrw_banner = false
vim.g.netrw_sort_options = "i"
vim.g.netrw_list_hide = [[^\./$]]
